package com.yxw.springmvc.userBehavior.controller;

import com.yxw.springmvc.userBehavior.model.BasicCust;
import com.yxw.springmvc.userBehavior.request.BasicCustAddRequest;
import com.yxw.springmvc.userBehavior.service.CustManageService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by hp on 2016/9/30.
 */
@Controller
@RequestMapping("/custManager")
public class CustManageController {

    @Resource
    private CustManageService custManageService;

    @RequestMapping("/add")
    @ResponseBody
    public BasicCust add(BasicCustAddRequest request){
        BasicCust cust = custManageService.add(request);
        return cust;
    }
}
